Skip to content

fix: catch in the wrong position in logActionInChat#96

Merged
lorenzocorallo merged 2 commits intomainfrom
log-action-wrong-catch
Apr 11, 2026
Merged

fix: catch in the wrong position in logActionInChat#96
lorenzocorallo merged 2 commits intomainfrom
log-action-wrong-catch

Conversation

@lorenzocorallo
Copy link
Copy Markdown
Member

No description provided.

@lorenzocorallo lorenzocorallo requested a review from toto04 April 11, 2026 21:31
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2026

Warning

Rate limit exceeded

@lorenzocorallo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 21 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 12 minutes and 21 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fc9b80bd-13d5-4caf-8402-2f61e94e84c3

📥 Commits

Reviewing files that changed from the base of the PR and between 95c9925 and 2e58677.

📒 Files selected for processing (1)
  • src/modules/tg-logger/index.ts

Walkthrough

Modified TgLogger.logModActionInChat to make message deletion conditional on successful message sending. The promise chain now returns null on send failure, preventing the delayed deletion operation from executing when the message post was unsuccessful.

Changes

Cohort / File(s) Summary
Error Handling in Moderation Logging
src/modules/tg-logger/index.ts
Updated promise chain to return null on sendMessage failure; delayed message deletion now only executes when send succeeds (sent && ...), preventing deletion attempts after failed message posts.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately identifies the main change: a catch block positioned incorrectly in the logActionInChat method, which is now fixed to prevent incorrect promise chain behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lorenzocorallo lorenzocorallo merged commit 4e6b21f into main Apr 11, 2026
2 checks passed
@lorenzocorallo lorenzocorallo deleted the log-action-wrong-catch branch April 11, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants